package com.zzxx.service;

import com.github.pagehelper.PageInfo;
import com.zzxx.entity.Gym;
import com.zzxx.entity.Manager;
import com.zzxx.entity.ManagerAndPower;
import com.zzxx.entity.ManagerPower;
import com.zzxx.exceptions.UpdateException;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;


public interface GymService {
    PageInfo<Gym> queryAll(Integer start, Integer pageSize);

    Gym queryById(String id);

	PageInfo<Gym> findPage(Integer pageNum, Integer pageSize);

	Gym findById(String gid);

	void updateById(MultipartFile uploadPic, Gym gym, Manager loginManager) throws IOException, UpdateException;

	void addGym(MultipartFile uploadPic, Gym gym) throws IOException, UpdateException;

	void delete(String gid, String id) throws UpdateException;

	boolean checkPower(String gid, String id);

	List<ManagerPower> findPower(String gid, String id);

	List<ManagerAndPower> packageMap(List<ManagerPower> list);

	void updatePower(List<ManagerAndPower> list);

	void removePower(String mpid);

	String addPower(String addName, String addPower, String addType, String addPowerId);
}
